<div class="top-fixed">
    <div class="navbar" style="max-width: 640px;margin: auto;">
        <div class="navbar-inner">
            <div class="left">
                <a href="javascript:history.back();" class=""><i class="fa fa-angle-left" style="font-size: 30px;"></i></a>
            </div>
            <div class="center">粉丝订单</div>
            <div class="right">
                <a href="/" class=""><i class="fa fa-home"></i></a>
            </div>
        </div>
    </div>
</div>

<input type="hidden" id="agency_id" value="{{user.id}}">

<section class="main" style="max-width: 640px;margin: auto;">
    <div class="table index-nav fs12 tc">
        <a href="javascript:;" class="table-cell  br">
            <p id="all_amount" class="fs18 red bold">0</p>
            <p>总收入(元/个)</p>
        </a>
        <a href="javascript:;" class="table-cell  br">
            <p id="pending_settle" class="fs18 blue bold">0</p>
            <p>待结算(元/个)</p>
        </a>
        <a href="javascript:;" class="table-cell  br">
            <p id="pending_account" class="fs18 green bold">0</p>
            <p>未入账(元/个)</p>
        </a>
    </div>
    <div id="status-filter" class="table bgf tc fs14 order_nav">
        <a href="/fans_orders?status=All" data-value="All"
           class="table-cell {{#if_eq query.status 'All'}}active{{/if_eq}}">
            <span class="hint-num">所有订单</span>
        </a>
        <a href="/fans_orders?status=Active" data-value="Active"
           class="table-cell {{#if_eq query.status 'Active'}}active{{/if_eq}}">
            <span class="hint-num">有效订单</span>
        </a>
        <a href="/fans_orders?status=Deactivated" data-value="Deactivated"
           class="table-cell {{#if_eq query.status 'Deactivated'}}active{{/if_eq}}">
            <span class="hint-num">无效订单</span>
        </a>
    </div>
    <div class="weui_search_bar" id="search_bar">
        <form class="weui_search_outer" id="search_form" method="get" action="/fans_orders">
            <div class="weui_search_inner">
                <i class="weui_icon_search"></i>
                <input type="search" class="weui_search_input" id="search_input" name="keyword"
                       placeholder="搜索订单编号"
                       required value="{{query.taobaoTradeParentId}}"/>
                <a href="javascript:" class="weui_icon_clear" id="search_clear"></a>
            </div>
            <label for="search_input" class="weui_search_text" id="search_text">
                <i class="weui_icon_search"></i>
                <span>搜索订单编号</span>
            </label>
        </form>
        <a href="javascript:" class="weui_search_cancel" id="search_cancel">取消</a>
    </div>
    <div style="color: #FC6D84; text-align: center; line-height: 30px; font-size: 14px; background: #fff;">
        数据有几分钟延时，如果数据没有显示，请过几分钟再试
    </div>
    <div class="contact_con fs12">
        {{#if rows}}
            <ul class="list-wrapper">
                {{#each rows}}
                    <li class="bb">
                        <dl class="table ptb10">
                            {{#if pictUrl}}
                                <dt class="table-cell vm w70 plr10">
                                    <div class="br5 item-pic">
                                        <a href="/detail?id={{auctionId}}"><img src="{{pictUrl}}" class="imgm"></a>
                                    </div>
                                </dt>
                            {{/if}}
                            <dd class="table-cell vm">
                                <p class="col3 single-line"><a href="/detail?id={{auctionId}}">{{auctionTitle}}</a></p>
                                <p class="col3">所属店铺：{{exShopTitle}}</p>
                                <p style="color: #FA6E28;">{{payStatus}}</p>
                            </dd>
                        </dl>

                        <div class="table">
                            <dd class="table-cell vm p10">
                                <p class="col3 single-line">付款金额</p>
                                <p class="col3">￥{{totalAlipayFeeString}}</p>
                            </dd>
                            <dd class="table-cell vm p10">
                                <p class="col3 single-line">代理收入</p>
                                <p class="col3 red">￥{{or agency_amount '0'}}</p>
                            </dd>
                            {{#if pay_amount}}
                                <dd class="table-cell vm p10">
                                    <p class="col3 single-line">用户返现</p>
                                    <p class="col3">￥{{or pay_amount '0'}}</p>
                                </dd>
                            {{/if}}
                        </div>

                        <div class="table">
                            <dd class="table-cell vm p10">
                                <p class="col6">订单号: {{anonymous_order taobaoTradeParentId}}</p>
                            </dd>
                        </div>
                        <div class="table">
                            <dd class="table-cell vm p10">
                                <p class="col6">{{format_datetime createTime}} 创建</p>
                            </dd>
                            {{#if earningTime}}
                                <dd class="table-cell vm p10">
                                    <p class="col6">{{format_datetime earningTime}} 结算</p>
                                </dd>
                            {{/if}}
                        </div>
                    </li>
                {{/each}}
            </ul>

            <div class="loadmore-wrapper loadmore" style="margin: 10px;">
                {{#if loadmore}}
                    <div class="weui-infinite-scroll">
                        <div class="infinite-preloader"></div>
                        正在加载...
                    </div>
                {{/if}}
            </div>
        {{^}}
            <div class="tc nothing">
                <span class="mt10 fs14 col9">晳时还没有粉丝下单！</span>
            </div>
        {{/if}}
    </div>
</section>